package com.bootdo.wx.service.impl;

import cn.hutool.core.map.MapUtil;
import com.bootdo.wx.dao.CmsProblemClassDao;
import com.bootdo.wx.domain.CmsProblemClassDO;
import com.bootdo.wx.service.CmsProblemClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;



@Service
public class CmsProblemClassServiceImpl implements CmsProblemClassService {
	@Autowired
	private CmsProblemClassDao cmsProblemClassDao;
	
	@Override
	public CmsProblemClassDO get(String id){
		return cmsProblemClassDao.get(id);
	}
	
	@Override
	public List<CmsProblemClassDO> list(Map<String, Object> map){
		return cmsProblemClassDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return cmsProblemClassDao.count(map);
	}
	
	@Override
	public int save(CmsProblemClassDO cmsProblemClass){
		return cmsProblemClassDao.save(cmsProblemClass);
	}
	
	@Override
	public int update(CmsProblemClassDO cmsProblemClass){
		return cmsProblemClassDao.update(cmsProblemClass);
	}
	
	@Override
	public int remove(String id){
		return cmsProblemClassDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return cmsProblemClassDao.batchRemove(ids);
	}

    @Override
    public List<CmsProblemClassDO> likeList(Map<String, Object> map){
        return cmsProblemClassDao.likeList(map);
    }

    @Override
    public List<CmsProblemClassDO> getProblemClass() {
		HashMap<String, Object> objectObjectHashMap = MapUtil.newHashMap();
		objectObjectHashMap.put("delFlag","0");
		objectObjectHashMap.put("sort","location");
		objectObjectHashMap.put("order","asc");
		List<CmsProblemClassDO> list=cmsProblemClassDao.list(objectObjectHashMap);
		return list;

    }

}
